x86/iommu: don't map RAM holes above 4G
authorKeir Fraser <keir@xen.org>
Tue, 14 Dec 2010 09:52:57 +0000 (09:52 +0000)
committerKeir Fraser <keir@xen.org>
Tue, 14 Dec 2010 09:52:57 +0000 (09:52 +0000)
commit3bc257c211c341a39cc25d93e2058f6f78c347a4
tree37b503303e4c8fce44559b2af53b731c63b54618
parent18ed5fb3b5926fc0bc499b177393d77a52309388
x86/iommu: don't map RAM holes above 4G

Matching the comment in iommu_set_dom0_mapping(), map only actual RAM
from the address range starting at 4G. It's not clear though whether
that comment is actually correct (which is why I'm sending this as
RFC), but it is certain that on systems with sparse physical memory
map we're currently wasting a potentially significant amount of memory
for setting up IOMMU page tables that will never be used.

The main question is what happens for MMIO ranges living above 4G. Of
course, the same issue would currently exist for any such ranges
sitting beyon the end of RAM.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/vtd/x86/vtd.c